# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-tophide
_pkgname=tophide
pkgver=1.0.4
pkgrel=0
pkgdesc="Hide OCaml toplevel values whose name starts with an underscore"
url="https://github.com/mjambon/tophide"
arch="all !riscv64" # restricted by ocaml
license="BSD-3-Clause"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="ocaml ocaml-compiler-libs ocaml-findlib"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/mjambon/tophide/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

# 32-bit archs
case "$CARCH" in
	arm*|x86) options="$options textrels" ;;
esac

build() {
	make
}

package() {
	export OCAMLFIND_DESTDIR="$pkgdir"/usr/lib/ocaml
	mkdir -vp "$OCAMLFIND_DESTDIR"
	make install
}

sha512sums="
9dafd73463f349e77b410e8df56966812752e78f08ad6ec5f1f13958beb374f8396fd05233b6499b0b941dc9ee5ca0d96e19041fc9b28c125692c8abf693734c  ocaml-tophide-1.0.4.tar.gz
"
